# _*_ coding:utf-8 _*_

"""
# @Time　 : 2021/12/28 21:05
# @Author : king
# @File　 : yaml_handle.py
# @project: ApiPytestFramework
# @QQ     : 772084279
# @Email  : 772084279@qq.com
# @blog   : https://ceshizhilu.blog.csdn.net/
"""
import yaml

from common_utils.api_path import data_path


class ReadYaml:

    def __init__(self, filename):
        self.filename = filename

    @property
    def read_yaml(self) -> object:
        with open(file=self.filename, mode="r", encoding="utf-8") as fp:
            case_data = yaml.safe_load(fp.read())
        return case_data


if __name__ == '__main__':
    print(ReadYaml(data_path + "test_login.yaml").read_yaml)